#pragma once

#include "Texture.h"
#include "Animation.h"
#include "HelpfulData.h"
#include "Entity.h"

enum WeaponType { FISTS, MANUAL, BAT, AIRPLANE, STAPLEGUN, SPRAY, NAILGUN } ;

class Item
{
private:
	enum Type {CURRENCY, WEAPON, MISC, AMMO};
	Type itemType ;
	int amount ;
public:
	Item( ) {}

	//copy constructor
	Item( int type ) { itemType = (Type)type ; }
	~Item( ) {}

	virtual void use() { --amount ; }
	void pickup() { ++amount ; }

	int GetItemType( ) { return itemType ; }
};

class Weapon : Item
{
private:
	int str;
	int force;
	float range;

	Texture held;
	Animation animation;
	Entity bullets ;

	ClDwn atkDelay;

	WeaponType weapon ;
public:
	
};

class Misc : Item
{
private:
	//type of misc items available
	enum MiscType { KIT, KEY, SUPERGLUE, MEAT, REPELLENT, THROWING } ;

	Entity miscItem ;
	Entity* player ;

	//stores texture type and animation
	Texture held ;
	Animation animation ;

	//holds the type of this item
	MiscType type ;
	//used items that have an effect on the map for a time has a duration
	float duration ;
	//throwing weapons cause a fixed amount of damage
	int damage ;

public:
	
};

class Ammo : Item
{
private:
	enum AmmoType {NONE, TOY, PAPER, STAPLES, HOLYWATER, NAILS};
	AmmoType type ;
	int amount ;
public:
	int GetAmmoType( int w ) ;
} ;